package repository

import (
	"hcy-go/global/db"
	"hcy-go/global/structs/table"
)

type CoursewareDb struct {
}

func (r CoursewareDb) Save(m *table.Courseware) (err error) {
	err = db.GetDB().Save(m).Error
	return
}

func (r CoursewareDb) FindAll() (li []table.Courseware, err error) {
	err = db.GetDB().Find(&li).Error
	return
}
